<?php
/**
 * Session过滤器类
 *
 * @copyright Copyright (c) 2008 www.eefocus.com
 * @author kokko<kokko313@gmail.com>
 * @package com
 * @subpackage eefocus
 * @version 1.0 2007-7-30
 */
class SessionFilter implements IFilter{
	function __construct(){
		//
		if( conf( 'SESSION_DOMAIN' ) != '' )
			ini_set('session.cookie_domain',conf( 'SESSION_DOMAIN' ) );
		//设置垃圾回收最大生存时间
		if( conf( 'SESSION_EXPIRE' ) > 0 )
			ini_set('session.gc_maxlifetime',conf( 'SESSION_EXPIRE' ) );

		if( conf( 'SESSION_NAME' ) != '' )
			session_name( conf( 'SESSION_NAME' ) );
		if( conf( 'SESSION_PATH' ) != '' )
			session_save_path( conf( 'SESSION_PATH' ) );
	}
	
	/**
	 * 执行过滤器
	 */
	function preExecute(){
		session_start();
	}
	
	public function afterExecute(){
		
	}
}//end class
?>